package com.fanjun.learning.multithread.Activity_Object_Pattern;

/**
 * Created by fanjun on 16/10/17.
 */
public class MakingStringRequest extends Request{
    private final char fillChar;
    private final int count;
    public MakingStringRequest(String name, Servant servant, FutureResult future, char fillChar, int count) {
        super(name,servant,future);
        this.fillChar = fillChar;
        this.count = count;
    }

    public void execute() {
        Result result = servant.makeString(count, fillChar);
        future.setResult(result);
    }
}
